<section class='lobby-generic lobby-world'>
<div class='header-jumbotron'>
<md:button class='md-fab lobby-back' ng:href="#!{{'top.game-overview' | routeSegmentUrlStateless}}">
<div class='fa fa-chevron-left'></div>
</md:button>
<h1>Power Rank</h1>
<div class='subtitle'>
The leaderboard of power gained during a month. You earn rating points for processing power in your Power Spawns.<br>
In the end of the month, your rank is reset.
<a app-nw-external-link href='http://docs.screeps.com/power.html' target='_blank'>Learn more</a>
</div>
</div>
<div class='leaderboard'>
<div class='my-rank-block' ng:if='Me()'>
<div class='my-rank-title'>YOUR RANK</div>
<a class='my-rank-value' ng:href="#!{{'top.game-lobby-power.list' | routeSegmentUrlStateless}}?page={{LobbyPower.myResult.page}}&amp;highlight={{LobbyPower.myResult.rank}}" ng:if='LobbyPower.myResult'>
{{LobbyPower.myResult.rank+1}}
</a>
<span class='my-rank-value' ng:if='!LobbyPower.myResult'>&mdash;</span>
</div>
<h2>
<ui:drop-group class='with-icon'>
<ui:drop-btn class='switch-season'>
{{LobbyPower.season.name}}
</ui:drop-btn>
<ui:drop>
<ui:drop-item ng:repeat='item in LobbyPower.seasonsList track by item._id'>
<a ng:href="#!{{ 'top.game-lobby-power.list' | routeSegmentUrlStateless: {season: item._id} }}"><i class='fa fa-check' ng:if='LobbyPower.season._id == item._id'></i><span>{{item.name}}</span>
</a>
</ui:drop-item>
</ui:drop>
</ui:drop-group>
</h2>
<form app:form-fail-anim='anim-shake' app:submit='LobbyPower.submitSearch()' class='search'>
<md-input-container class='md-float-icon'>
<md-icon>
<div class='fa fa-search'></div>
</md-icon>
<label>Search by name</label>
<input ng:model='LobbyPower.search'>
</md-input-container>
</form>
<div app:view-segment='2' class='leaderboard-list'>
<div ng:if='LeaderboardList.list.length'>
<table class='table table-striped'>
<tr>
<th>Rank</th>
<th>Player</th>
<th>Power points</th>
</tr>
<tr ng:class='{highlight: LeaderboardList.highlight == item.rank}' ng:mouseleave='hover = false' ng:mouseover='hover = true' ng:repeat='item in LeaderboardList.list track by $index'>
<td>{{item.rank+1}}</td>
<td>
<a ng:href="#!{{$routeSegment.getSegmentUrl('top.profile', {username: LeaderboardList.users[item.user].username})}}">
<img app:badge-src='LeaderboardList.users[item.user].badge'>
{{LeaderboardList.users[item.user].username}}
</a>
</td>
<td class='score'><span>{{item.score | number}}</span></td>
</tr>
</table>
<div class='pagination-container'>
<ul class='pagination'>
<li ng:class='{disabled: LeaderboardList.startPage === false}' title='First page'>
<a class='fa fa-angle-double-left' ng:if='LeaderboardList.startPage === false'></a>
<a class='fa fa-angle-double-left' ng:href="#!{{'top.game-lobby-power.list' | routeSegmentUrlStateless}}?page={{LeaderboardList.startPage}}" ng:if='LeaderboardList.startPage !== false'></a>
</li>
<li ng:class='{disabled: LeaderboardList.prevPage === false}' title='Previous page'>
<a class='fa fa-angle-left' ng:if='LeaderboardList.prevPage === false'></a>
<a class='fa fa-angle-left' ng:href="#!{{'top.game-lobby-power.list' | routeSegmentUrlStateless}}?page={{LeaderboardList.prevPage}}" ng:if='LeaderboardList.prevPage !== false'></a>
</li>
<li ng:class='{active: page.active}' ng:repeat='page in LeaderboardList.pages'>
<a ng:href="#!{{'top.game-lobby-power.list' | routeSegmentUrlStateless}}?page={{page.num}}">{{page.num}}</a>
</li>
<li ng:class='{disabled: LeaderboardList.nextPage === false}' title='Next page'>
<a class='fa fa-angle-right' ng:if='LeaderboardList.nextPage === false'></a>
<a class='fa fa-angle-right' ng:href="#!{{'top.game-lobby-power.list' | routeSegmentUrlStateless}}?page={{LeaderboardList.nextPage}}" ng:if='LeaderboardList.nextPage !== false'></a>
</li>
<li ng:class='{disabled: LeaderboardList.endPage === false}' title='Last page'>
<a class='fa fa-angle-double-right' ng:if='LeaderboardList.endPage === false'></a>
<a class='fa fa-angle-double-right' ng:href="#!{{'top.game-lobby-power.list' | routeSegmentUrlStateless}}?page={{LeaderboardList.endPage}}" ng:if='LeaderboardList.endPage !== false'></a>
</li>
</ul>
</div>
</div>
<div class='empty' ng:if='!LeaderboardList.list.length'>
No results yet
</div>
</div>
</div>
</section>
